package com.justgame.project.generator.utils;

import com.justgame.project.generator.schema.Entity;
import com.justgame.project.generator.schema.Field;

import java.util.Optional;

public class EntityUtils {
    public static Optional<Field> findField(Entity entity, String fieldName){
        return entity.getFields().stream().filter(field -> field.getName().equals(fieldName)).findFirst();
    }
}
